using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Versions
{
    /// <summary>
    /// <para>Register As Versioned</para>
    /// <para>Registers an enterprise geodatabase dataset as versioned.</para>
    /// <para>将企业级地理数据库数据集注册为版本。</para>
    /// </summary>    
    [DisplayName("Register As Versioned")]
    public class RegisterAsVersioned : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RegisterAsVersioned()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_dataset">
        /// <para>Input Dataset</para>
        /// <para>The dataset to be registered as versioned.</para>
        /// <para>要注册为版本的数据集。</para>
        /// </param>
        public RegisterAsVersioned(object _in_dataset)
        {
            this._in_dataset = _in_dataset;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Register As Versioned";

        public override string CallName => "management.RegisterAsVersioned";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_dataset, _edit_to_base.GetGPValue(), _out_dataset];

        /// <summary>
        /// <para>Input Dataset</para>
        /// <para>The dataset to be registered as versioned.</para>
        /// <para>要注册为版本的数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_dataset { get; set; }


        /// <summary>
        /// <para>Register the selected objects with the option to move edits to base</para>
        /// <para><xdoc>
        ///   <para>Specifies whether edits made to the default version will be moved to the base tables.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The dataset will be versioned with the option of moving edits to base.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The dataset will be versioned without the option of moving edits to base. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将对默认版本所做的编辑移动到基表。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将对数据集进行版本化，并可选择将编辑内容移动到基础。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将对数据集进行版本化，而不选择将编辑内容移动到基础。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Register the selected objects with the option to move edits to base")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _edit_to_base_value _edit_to_base { get; set; } = _edit_to_base_value._false;

        public enum _edit_to_base_value
        {
            /// <summary>
            /// <para>EDITS_TO_BASE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("EDITS_TO_BASE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_EDITS_TO_BASE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_EDITS_TO_BASE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Input Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_dataset { get; set; }


        public RegisterAsVersioned SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}